//
//  DataBase.h
//  NewsReader
//
//  Created by blacksun on 11-2-17.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "sqlite3.h"

#define kSqlFilePath @"data.sqlite3"

@interface Database : NSObject {
	sqlite3 *database;
}

-(void) connection;
-(void) close;
-(void) excuteSql:(NSString *)aSql withParams:(NSArray *)aParams;
-(sqlite3_stmt *) query:(NSString *)aSql withParams:(NSArray *)aParams;
-(void) finalizeStatement:(sqlite3_stmt *)aStmt;
-(void) beginTransaction;
-(void) commitTransaction;

+(void) createTables;

@end
